home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
DATABASE.DIR
/
00085_Script_CLICK TOPIC TEXT
< prev
next >
Wrap
Text File
|
1996-03-28
|
1KB
|
34 lines
-- --------------------------------------------------------
-- Handler doClickTopicText is called when the user clicks
-- the text of a topic. It checks if the user clicked a
-- hypermedia link or is dragging to copy a selection of
-- the text.
on doClickTopicText
global textSprite, currentTextCast, hypertextWords
global pictureButton, textButton
-- (1) check that the picture button is not activated
-- because you don't want them to be able to click
-- the text sprite that appears behind the picture sprite
-- (2) check that the and artcle appears (ie the text
-- button is activated)
-- (3) check that the user did not double click on a link.
-- (if they did, and we weren't checking, the link might
-- appear all hilighted).
if not(isActivated(pictureButton)) and isActivated(textButton) and not(the doubleClick) then
set currentTextCast = the castNum of sprite textSprite
set wordNumber = the mouseWord
set clickedword = word wordNumber of field currentTextCast
set linkType = getHyperLinkType(wordNumber)
if (linkType <> -1) then
set the editableText of sprite textSprite = FALSE
processHyperLink(wordNumber, linkType)
else
-- set the editableText of sprite textSprite = TRUE
end if
end if
end